package com.shiguiwu.springmybatis.spring.event.spring;

import org.springframework.context.event.EventListener;
import org.springframework.stereotype.Component;

/**
 * @description:
 * @author: stone
 * org.springframework.context.event.EventListenerMethodProcessor#afterSingletonsIn
 * stantiated
 * @date: Created by 2021/4/24 22:47
 * @version: 1.0.0
 * @pakeage: com.shiguiwu.springmybatis.spring.event.spring
 */
@Component
public class UserRegisterListenerPlus {

    /**
     * 发送邮件
     * @param event
     */
    @EventListener
    public void sendEmail(UserRegEvent event) {
        System.out.println(event.getUsername()+"发送邮件。。。。。。。。");
    }


    /**
     * 发送积分
     * @param event
     */
    @EventListener
    public void sendCoupe(UserRegEvent event) {
        System.out.println(event.getUsername() + "发送积分。。。。。。。。");

    }


}
